import request from '@/utils/http'
// import qs from 'qs'

export function userList (params) {
  return request({
    url: '/user/list',
    method: 'GET',
    params
  })
}

export function areaDict (params) {
  return request({
    url: '/commonDataInfo/areaDict',
    method: 'GET',
    params
  })
}

export function userAdd (params) {
  return request({
    url: '/user/add',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json' // 设置为JSON格式
    }
  })
}

export function userUpdate (params) {
  return request({
    url: '/user/update',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json' // 设置为JSON格式
    }
  })
}

export function userDelete(params) {
  return request({
    url: '/user/delete',
    method: 'DELETE',
    data: params,
    headers: {
      'Content-Type': 'multipart/form-data' // 设置为JSON格式
    }
  })
}


export function rolePermission (params) {
  return request({
    url: '/role/permission',
    method: 'GET',
    params
  })
}
 
export function updateUserPassword (params) {
  return request({
    url: '/user/updateUserPassword',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json' // 设置为JSON格式
    }
  })
}